home *** CD-ROM | disk | FTP | other *** search
/ Remix Doll 3: Dirty Sally / Remix Doll 3: Dirty Sally.iso / drtyslly.exe / MAIN_FNL.DXR / 04958_TTVLayer.ls < prev    next >
Encoding:
Text File  |  1995-02-11  |  3.0 KB  |  149 lines

  1. property ancestor, fMovie, fPlayingTape
  2. global kRoomNames
  3.  
  4. on birth me
  5.   set ancestor to NewObj("TLayer")
  6.   mITVLayer(me)
  7.   return me
  8. end
  9.  
  10. on mITVLayer me
  11.   set aSpr to 28
  12.   set aTV to mNewView(me, "TAnim", aSpr, "TV")
  13.   mStCastNum(aTV, the number of cast "TV")
  14.   set aSpr to 36
  15.   set aCloseTV to mNewView(me, "TMyView", aSpr, "closeTV")
  16.   mPuppetOn(aCloseTV)
  17.   mStCastNum(aCloseTV, the number of cast "closeTV")
  18.   mITVControl(me)
  19.   mIMovie(me)
  20.   mIPlayingTape(me)
  21. end
  22.  
  23. on mITVControl me
  24.   set aSpr to 30
  25.   set aNumTVCtls to 6
  26.   set aTVCtlCast to the number of cast "TVControl" - 1
  27.   repeat with aTVCtlCount = 1 to aNumTVCtls
  28.     set aTVCtl to mNewView(me, "TView", aSpr + aTVCtlCount - 1, "TVCtl" & aTVCtlCount)
  29.     mPuppetOn(aTVCtl)
  30.     mStCastNum(aTVCtl, aTVCtlCast + aTVCtlCount)
  31.   end repeat
  32. end
  33.  
  34. on mIMovie me
  35.   set aSpr to 29
  36.   set fMovie to mNewView(me, "TMoov", aSpr, "movie")
  37. end
  38.  
  39. on mIPlayingTape me
  40.   set fPlayingTape to 0
  41. end
  42.  
  43. on mStMovie me, vRoomName, vCkrchNum
  44.   set aRoomNum to getPos(kRoomNames, vRoomName)
  45.   set aMovieName to "M" & vCkrchNum & aRoomNum & ".MOV"
  46.   mStCastNum(fMovie, the number of cast aMovieName)
  47.   updateStage()
  48.   mStMovRate(fMovie, 0)
  49.   mStDirectToStage(fMovie, 1)
  50. end
  51.  
  52. on mStPlayingTape me, vTape
  53.   set fPlayingTape to vTape
  54. end
  55.  
  56. on mEjectTape me
  57.   if objectp(fPlayingTape) then
  58.     mStCastNum(fMovie, the number of cast "NULL.MOV")
  59.     updateStage()
  60.     mStMovRate(fMovie, 0)
  61.     mEjectFromTV(fPlayingTape)
  62.   end if
  63. end
  64.  
  65. on mPlay me
  66.   if the commandDown then
  67.     mStMovRate(fMovie, 2)
  68.   else
  69.     if the optionDown then
  70.       mStMovRate(fMovie, 4)
  71.     else
  72.       if the controlDown then
  73.         mStMovRate(fMovie, 8)
  74.       else
  75.         mStMovRate(fMovie, 1)
  76.       end if
  77.     end if
  78.   end if
  79. end
  80.  
  81. on mRev me
  82.   if the doubleClick then
  83.     mStMovTimeBgn(fMovie)
  84.   else
  85.     set aSavedRate to mGtMovRate(fMovie)
  86.     if the optionDown then
  87.       mStMovRate(fMovie, -4)
  88.     else
  89.       if the controlDown then
  90.         mStMovRate(fMovie, -8)
  91.       else
  92.         mStMovRate(fMovie, -2)
  93.       end if
  94.     end if
  95.     repeat while the mouseDown
  96.       updateStage()
  97.     end repeat
  98.     mStMovRate(fMovie, aSavedRate)
  99.   end if
  100. end
  101.  
  102. on mFwd me
  103.   if the doubleClick then
  104.     mStMovTimeEnd(fMovie)
  105.   else
  106.     set aSavedRate to mGtMovRate(fMovie)
  107.     if the optionDown then
  108.       mStMovRate(fMovie, 4)
  109.     else
  110.       if the controlDown then
  111.         mStMovRate(fMovie, 8)
  112.       else
  113.         mStMovRate(fMovie, 2)
  114.       end if
  115.     end if
  116.     repeat while the mouseDown
  117.       updateStage()
  118.     end repeat
  119.     mStMovRate(fMovie, aSavedRate)
  120.   end if
  121. end
  122.  
  123. on mPause me
  124.   mStMovRate(fMovie, 0)
  125. end
  126.  
  127. on mStop me
  128.   mStMovRate(fMovie, 0)
  129. end
  130.  
  131. on mShowLayer me
  132.   mShowLayer(ancestor)
  133.   if not (the optionDown) then
  134.     set the colorDepth to 16
  135.     if the colorDepth <> 16 then
  136.       set the colorDepth to 32
  137.     end if
  138.   end if
  139. end
  140.  
  141. on mHideLayer me
  142.   set aNullCastNum to the number of cast "NULL.MOV"
  143.   mStCastNum(fMovie, aNullCastNum)
  144.   mStMovRate(fMovie, 0)
  145.   mStMovTimeBgn(fMovie)
  146.   mHideLayer(ancestor)
  147.   set the colorDepth to 8
  148. end
  149.